package com.plian.system.dao.sys.orgzation;

import com.plian.Tools.pagedata.PageData;
import com.plian.system.dao.DaoSupport;
import com.plian.system.model.page.Page;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * 工作流用户组dao
 */
@Component
public class WorkFlowGroupDao {
    @Resource(name="daoSupport")
    private DaoSupport dao;

    public void insert(PageData pd) throws Exception {
        dao.save("SysWfGroupMapper.insert",pd);
    }

    public List<PageData> list() throws Exception {
        return (List<PageData>)dao.findForList("SysWfGroupMapper.selectAll",null);
    }
    public List<PageData> listPage(Page page) throws Exception {
        return (List<PageData>)dao.findForList("SysWfGroupMapper.selectAllPage",page);
    }
    public List<PageData> listShowPage(Page page) throws Exception {
        return (List<PageData>)dao.findForList("SysWfGroupMapper.listShowPage",page);
    }

    public void delete(PageData pd) throws Exception {
        dao.update("SysWfGroupMapper.delete",pd);
    }

    public void update(PageData pd) throws Exception {
        dao.update("SysWfGroupMapper.update",pd);
    }
}
